
<html>
  
  <HEAD>
    
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    
    <link rel="stylesheet" href="style/default.css" type="text/css">
  
    <title>JAXB RI 2.1.9 fcs -- Schema Generator
    </title>
    <link rel="alternate" href="https://jaxb.dev.java.net/servlets/ProjectNewsRSS" type="application/rss+xml">
  </HEAD>

  
  <BODY>
    <h1>
      <banner>
    Java
        <sup>
          <font size="-2">TM</font>
        </sup> Architecture for XML Binding
  
      </banner>
      <br>
      Schema Generator 
    
    </h1>
    <center>
      <b>Implementation Version:</b> 2.1.9 fcs
      <br>
    </center>
    <table class="navbar" cellspacing="0">
      <tr>
        <td class="inactive">
          <a href="index.html">JAXB 2.0</a>
        </td>
        <td class="active">
          <a>Tools</a>
        </td>
        <td class="inactive">
          <a href="jaxb-1_0.html">JAXB 1.0.x</a>
        </td>
        <td class="inactive">
          <a href="vendor.html">JAXB RI Extensions</a>
        </td>
        <td class="inactive">
          <a href="community.html">JAXB Community</a>
        </td>
      </tr>
    </table>
    <div class="subnavbar">
      <ul>
        <li class="first">
          <a href="xjc.html">
            <span>XJC </span>
          </a>
        </li>
        <li>
          <a href="xjcTask.html">
            <span>XJC Ant Task </span>
          </a>
        </li>
        <li>
          <a href="schemagen.html">
            <span class="active">SchemaGen </span>
          </a>
        </li>
        <li>
          <a href="schemagenTask.html">
            <span>SchemaGen Ant Task </span>
          </a>
        </li>
        <li>
          <a href="3rdparty.html">
            <span>3rd Party Tools </span>
          </a>
        </li>
      </ul>
    </div>
    
    <header></header>


    
    <h2>Launching schemagen</h2>
    
    <p>The schema generator can be launched using the appropriate
       
      <code>schemagen</code> shell script in the 
      <code>bin</code> directory
       for your platform.
    
    
    <p>The current schema generator can process either Java source files or class files.
    
    <p>We also provide an Ant task to run the schema generator - see the instructions
       for 
      <a href="schemagenTask.html"> using schemagen with Ant</a>.
    

    
    <blockquote>
      
      <h4>For Solaris/Linux</h4>
      
      <pre>
      % path/to/jaxb/bin/schemagen.sh Foo.java Bar.java ...
      Note: Writing schema1.xsd
      </pre>

      
      <h4>For WindowsNT/2000/XP</h4>
      
      <pre>
      &gt; path\to\jaxb\bin\schemagen.bat Foo.java Bar.java ...
      Note: Writing schema1.xsd
      </pre>
    
    </blockquote>

    
    <p>If your java sources/classes reference other classes, they must be accessable on your
       system CLASSPATH environment variable, or they need to be given to the tool by using the
       
      <tt>-classpath</tt>/
      <tt>-cp</tt> options. Otherwise you will see errors when generating your schema.
    
       
    

    
    <blockquote>
      
      <h4>Command Line Options</h4>
      
      <blockquote>
        
        <pre>
Usage: schemagen [-options ...] &lt;java files&gt; 

Options: 
    -d &lt;path&gt;         :  Specify where to place processor and javac generated class files 
    -cp &lt;path&gt;        :  Specify where to find user specified files  
    -classpath &lt;path&gt; :  Specify where to find user specified files  
    -episode &lt;file&gt;   :  generate episode file for separate compilation
    -version          :  display version information
    -help             :  Display this usage message
        </pre>

      
      </blockquote>
    
    </blockquote>

    

    
    <a name="switches"></a>
    
    <h3>Summary of Command Line Options</h3>
    
    <blockquote>
      
      <dl>
        
        
        <a name="-episode"></a>
        
        <dt>
          <b>-episode</b>
        </dt>
        
        <dd>
          Generates the "episode file", which is really just a JAXB customization file (but with vendor extensions specific to the JAXB RI, as of 2.1.) When people develop additional schemas that depend on what this 
          <tt>schemagen</tt> invocation produces, they can use this episode file to have their generated code refer to your classes.
        
        </dd>
      
      </dl>
    
    </blockquote>

    

    
    <a name="xjcresources"></a>
    
    <h2>Generated Resource Files</h2>
    
    <p>The current schema generator simply creates a schema file for each namespace
       referenced in your Java classes.  There is no way to control the name of the
       generated schema files at this time. Use 
      <a href="schemagenTask.html">the schema generator ant task</a> for that purpose.
    

    
    <hr>
    
    <div class="footer">
      $Revision: 1.1 $
      <br>
      $Date: 2007/12/05 00:49:15 $
    
    </div>
  



  </BODY>
</html>